#include "Bewegen.h"

bool Bewegen::bewegung(const GUIEventAdapter& ea, SceneGraphHandler* sceneGraphHandler){
	double schritt = 0.5;
	switch(ea.getKey()){
		// eye
        case 'w':
			sceneGraphHandler->setEyeX(sceneGraphHandler->getEyeX() -schritt );
			return false;
			break;
        case 's':
			if(sceneGraphHandler->viewer.getCameraManipulator() == NULL){
				sceneGraphHandler->setEyeX(sceneGraphHandler->getEyeX() +schritt );
				return true;
			}
			return false;
			break;
        case 'd':
			sceneGraphHandler->setEyeY(sceneGraphHandler->getEyeY() +schritt );
			return false;
			break;
        case 'a':
			sceneGraphHandler->setEyeY(sceneGraphHandler->getEyeY() -schritt );
			return false;
			break;
        case 'q':
			sceneGraphHandler->setEyeZ(sceneGraphHandler->getEyeZ() +schritt );
			return false;
			break;
        case 'e':
			sceneGraphHandler->setEyeZ(sceneGraphHandler->getEyeZ() -schritt );
			return false;
			break;
		// center
        case 'i':
			sceneGraphHandler->setCenterX(sceneGraphHandler->getCenterX() -schritt );
			return false;
			break;
        case 'k':
			sceneGraphHandler->setCenterX(sceneGraphHandler->getCenterX() +schritt );
			return false;
			break;
        case 'l':
			sceneGraphHandler->setCenterY(sceneGraphHandler->getCenterY() +schritt );
			return false;
			break;
        case 'j':
			sceneGraphHandler->setCenterY(sceneGraphHandler->getCenterY() -schritt );
			return false;
			break;
        case 'u':
			sceneGraphHandler->setCenterZ(sceneGraphHandler->getCenterZ() +schritt );
			return false;
			break;
        case 'o':
			sceneGraphHandler->setCenterZ(sceneGraphHandler->getCenterZ() -schritt );
			return false;
			break;
        default:
			return false;
        }
}
